<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3浮动布局</title>
    <style>
        .fu {
            background-color: #ff0;
            overflow: hidden;
            width: 500px;
        }
        .fu>div {
            width: 100px;
            height: 100px;
            border: 3px solid #f00;
        }
        .z1 {
            background-color: #f00;
            float: right;
        }
        .z2 {
            background-color: #0f0;
            float: right;
        }
        .z3 {
            background-color: #00f;
            float: right;
        }
        ul {
            margin: 0;
            padding: 0;
            background-color: #0aa1ed;
            overflow: hidden;/*解决父元素失高问题*/
            list-style: none;/*取出列表项前的黑色实心圆*/
        }
        ul>li {
            width: 100px;
            height: 40px;
            /*border: 5px solid #f00;*/
            /*让所有导航项li横着排*/
            float: left;
            text-align: center;
            color: #fff;
            line-height: 40px;
        }
    </style>
</head>
<body>
<div class="fu">
    <div class="z1"></div>
    <div class="z2"></div>
    <div class="z3"></div>
</div>

<ul>
    <li>首页</li>
    <li>免费课</li>
    <li>猎才课</li>
    <li>大厂就业课</li>
</ul>
</body>
</html>